package com.yuer.dubbo;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;
import java.time.chrono.JapaneseChronology;

public class YuerDubboMain {
    public static void main2(String[] args) throws IOException {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:dubbo-consumer.xml");
        applicationContext.start();
        HelloWorld helloWorld = applicationContext.getBean(HelloWorld.class);
        String  result = helloWorld.sayHello("1234567890-");
        System.out.println(result);
    }
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:dubbo-consumer.xml");
        applicationContext.start();
        HelloWorld helloWorld = applicationContext.getBean(HelloWorld.class);
        while (true){
            System.in.read();
            String  result = helloWorld.sayHello("1234567890-");
            System.out.println(result);
        }
    }
}
